<% if userImage.nil? -%>
    <%= link_to(image_tag('default_avatar_thumb.jpg'), "#", :class => 'user-post')%>
<% elsif userImage.image.nil? -%>
    <%= link_to(image_tag('default_avatar_thumb.jpg', :alt => "#{userImage.display_name}"), user_path(userImage.login), :class => 'user-post')%>
<% else -%>
    <%= link_to(image_tag(url_for_file_column(userImage, "image", "thumb"), :alt => "#{userImage.display_name}"), user_path(userImage.login), :class => 'user-post')%>
<% end -%>